<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      /* 宽度为视口的70%  */
      width: 70vw;
      height: 50vh;
      background-color: #dabfbf;
    }

    .b {
      background-color: #8a1616;
      width: 200px;
      height: 200px;
    }
  </style>
</head>

<body>
  <div class="box">
    盒子1
    <div>
      <div class="b">
        盒子2
      </div>
    </div>
  </div>
</body>

</html>